package com.markyao.service.impl;

import com.markyao.dao.mapper.DictDistrictMapper;
import com.markyao.dao.pojo.DictDistrict;
import com.markyao.service.DictDistrictService;
import com.markyao.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictDistrictServiceImpl implements DictDistrictService {
    @Autowired
    DictDistrictMapper dictDistrictMapper;
    @Override
    public Result findByParent(String parent) {
        List<DictDistrict> byParent = dictDistrictMapper.findByParent(parent);
        return new Result(true,"get_ok",1001,byParent);
    }

    @Override
    public String findByCode(String Code) {
        return dictDistrictMapper.findByCode(Code);
    }
}
